/* **********************************************************************************
 * Copyright (c) 2011 John Hughes
 *
 * Elve Touch is licenced under the Microsoft Reciprocal License (Ms-RL).
 *
 * Project Website: http://elvetouch.codeplex.com/
 * **********************************************************************************/

using System;
using System.Collections.Generic;
using System.Text;

namespace ElveTouch
{
    public class CommandLineArgs
    {
        CommandLineParser parser;
        public CommandLineArgs()
        {
            parser = new CommandLineParser(Environment.CommandLine, this);
            parser.Parse();
        }


        private bool _showHelp = false;

        [CommandLineSwitch("help", "Show the help")]
        public bool ShowHelp
        {
            get { return _showHelp; }
            set { _showHelp = value; }
        }


		private bool _window = false;

		[CommandLineSwitch("window", "Open in window (not fullscreen)")]
		public bool Window
		{
            get { return _window; }
            set { _window = (bool)value; }
		}

        private bool _hideMouse = false;

		[CommandLineSwitch("hidemouse", "Hide Mouse")]
        public bool HideMouse
        {
            get { return _hideMouse; }
            set { _hideMouse = value; }
        }

        private bool _kiosk = false;

        [CommandLineSwitch("Kiosk", "Sets the touch screen viewer to full screen and prevents closing. (only available when not in viewer)")]
        public bool Kiosk
        {
            get { return _kiosk; } // only allow kiosk when not in design mode
            set { _kiosk = value; }
        }

        private string _username = "";

        [CommandLineSwitch("username", "User Name")]
        public string Username
        {
            get { return _username; }
            set { _username = value; }
        }

        private string _password = "";

        [CommandLineSwitch("password", "Password")]
        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }

        private string _touchServiceHostName = "";

        [CommandLineSwitch("server", "Touch Service Host Name")]
        public string Server
        {
            get { return _touchServiceHostName; }
            set { _touchServiceHostName = value; }
        }

        private int _touchServicePort = 33907;

        [CommandLineSwitch("port", "Touch Service Port")]
        public int Port
        {
            get { return _touchServicePort; }
            set { _touchServicePort = value; }
        }

        private RenderingMode _renderingMode = RenderingMode.DrawCommands;

        [CommandLineSwitch("renderingmode", "Rendering Mode")]
        public RenderingMode RenderingMode
        {
            get { return _renderingMode; }
            set { _renderingMode = value; }
        }

        private bool _fitToScreen = false;

        [CommandLineSwitch("fittoscreen", "Resize the touchscreen to fit within the screen or window.")]
        public bool FitToScreen
        {
            get { return _fitToScreen; }
            set { _fitToScreen = value; }
        }

        private bool _autoSignIn = false;

        [CommandLineSwitch("autosignin", "Automatically sign in without showing signin window.")]
        public bool AutoSignIn
        {
            get { return _autoSignIn; }
            set { _autoSignIn = value; }
        }
    }
}
